package com.myway.controller;

//import com.myway.front.service.ITestService;
import com.alibaba.fastjson.JSON;
import com.myway.dto.common.JsonData;
import com.myway.service.TicketService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2018/8/12.
 */
@Controller
@Slf4j
public class DemoTestController {

    @Autowired
    private TicketService ticketService;

   /* @Autowired
    private ITestService testService;
    @RequestMapping("/test")
    @ResponseBody
    public String searchFilghts()throws Exception{
        String txt="";
        txt=testService.getName();
        log.info(txt);
        return txt;
    }*/
   @RequestMapping("/kkOrder")
   @ResponseBody
   public String kkOrder()throws Exception{
       JsonData json=ticketService.handleTicket("1808262125496562");
       log.info(JSON.toJSONString(json));
       return JSON.toJSONString(json);
   }

}
